let socket_res00 = [
    {
        "siteId": 1,
        "siteName": "站点名",
        "subProjects":
            [
                {
                    //站点1，第一套储能
                    "subProjectId": 2024080101,
                    "subProjectName": "储能1",
                    "devices":
                        [
                            {
                                "deviceNo": 202408010100001,
                                "deviceName": "PCS1设备",
                                "modelType": 27,  //pcs
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            },

                            {
                                "deviceNo": 202408010100002,
                                "deviceName": "BMS1",
                                "modelType": 28,  //pcs
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            },
                            {
                                "deviceNo": 202408010100003,
                                "deviceName": "电池簇1",
                                "modelType": 29,  //SBMU-电池簇
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            }
                        ]
                },
                {
                    //站点1，第一套储能
                    "subProjectId": 2024080102,
                    "subProjectName": "储能2",
                    "devices":
                        [
                            {
                                "deviceNo": 202408010100001,
                                "deviceName": "PCS22设备",
                                "modelType": 27,  //pcs
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            },

                            {
                                "deviceNo": 202408010100002,
                                "deviceName": "BMS1",
                                "modelType": 28,  //pcs
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            },
                            {
                                "deviceNo": 202408010100003,
                                "deviceName": "电池簇1",
                                "modelType": 29,  //SBMU-电池簇
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            }
                        ]
                },
                {
                    "subProjectId": 2024080101,
                    "subProjectName": "储能名",
                    "devices":
                        [
                            {
                                "deviceNo": 202408010100001,
                                "deviceName": "设备名",
                                "modelType": 27,
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            }
                        ]
                },
                {
                    "subProjectId": 2024080101,
                    "subProjectName": "储能名",
                    "devices":
                        [
                            {
                                "deviceNo": 202408010100001,
                                "deviceName": "设备名",
                                "modelType": 27,
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            }
                        ]
                },
                {
                    "subProjectId": 2024080101,
                    "subProjectName": "储能名",
                    "devices":
                        [
                            {
                                "deviceNo": 202408010100001,
                                "deviceName": "设备名",
                                "modelType": 27,
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            }
                        ]
                }
            ]
    },
    {
        "siteId": 1,
        "siteName": "站点2",
        "subProjects":
            [
                {
                    //站点1，第一套储能
                    "subProjectId": 2024080101,
                    "subProjectName": "储能1",
                    "devices":
                        [
                            {
                                "deviceNo": 202408010100001,
                                "deviceName": "PCS1设备",
                                "modelType": 27,  //pcs
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            },

                            {
                                "deviceNo": 202408010100002,
                                "deviceName": "BMS1",
                                "modelType": 28,  //pcs
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            },
                            {
                                "deviceNo": 202408010100003,
                                "deviceName": "电池簇1",
                                "modelType": 29,  //SBMU-电池簇
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            }
                        ]
                },
                {
                    //站点1，第一套储能
                    "subProjectId": 2024080102,
                    "subProjectName": "储能2",
                    "devices":
                        [
                            {
                                "deviceNo": 202408010100001,
                                "deviceName": "PCS22设备",
                                "modelType": 27,  //pcs
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            },

                            {
                                "deviceNo": 202408010100002,
                                "deviceName": "BMS1",
                                "modelType": 28,  //pcs
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            },
                            {
                                "deviceNo": 202408010100003,
                                "deviceName": "电池簇1",
                                "modelType": 29,  //SBMU-电池簇
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            }
                        ]
                },
                {
                    "subProjectId": 2024080101,
                    "subProjectName": "储能名",
                    "devices":
                        [
                            {
                                "deviceNo": 202408010100001,
                                "deviceName": "设备名",
                                "modelType": 27,
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            }
                        ]
                },
                {
                    "subProjectId": 2024080101,
                    "subProjectName": "储能名",
                    "devices":
                        [
                            {
                                "deviceNo": 202408010100001,
                                "deviceName": "设备名",
                                "modelType": 27,
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            }
                        ]
                },
                {
                    "subProjectId": 2024080101,
                    "subProjectName": "储能名",
                    "devices":
                        [
                            {
                                "deviceNo": 202408010100001,
                                "deviceName": "设备名",
                                "modelType": 27,
                                "deviceModelType": 1,
                                "status": 1, //设备状态：1正常，2离线，3告警，4故障
                                "timestamp": 202408010111101,
                                "updateTime": "2024-07-19",
                                "datas": {
                                    P: 100,
                                    Q: 100,
                                }
                            }
                        ]
                }
            ]
    }
]
let zhandian_1_pcs = [];
let zhandian_1_sbmu = [];
let zhandian_1_bms = [];


zhandian_1_pcs = get_device_list(socket_res00[0], 27);

function get_device_list(obj, modelType) {

    let device_arr = [];

    let zhan_storage = obj.subProjects;

    zhan_storage.forEach((item, key) => {

        item.devices.forEach((inner_item, inner_key) => {
            if (inner_item.modelType == modelType) {
                device_arr.push(inner_item)
            }
        })
    });

    console.log("device_arr", device_arr)

    return device_arr;


}